	  public int insertOrder(String idOffer, String createdDate, String paymentDeadline, String statusOrder) throws Exception
	  {
	      Order ord = new Order();
	      DBOrder dbOrd = new DBOrder();
	      int i = 0;

	      ord.setIdOrder("nextIdOrder");
	      ord.setOffer(new Offer(idOffer));
	      ord.setCreatedDate(createdDate);
	      ord.setPaymentDeadline(paymentDeadline);
	      ord.setStatusOrder(statusOrder);
	      	      
	      i = dbOrd.insertOrder(ord);
	      return i;
	  }
	  
	  /**
	   * @param idOrder
	   * @return ord an object Order with a given idOrder
	   * @throws Exception
	   */
	  public Order findOrderId(String idOrder) throws Exception 
	  {
		  DBOrder dbOrd = new DBOrder();
		  Order ord = new Order();
		  ord = dbOrd.findOrderId(idOrder, false);
	   
		  return ord;
	   }
	   
	   /**
	    * @param idOrder
	    * @return i updates object Order for a given idOrder
	    * @throws Exception
	    */
	   public int updateOrder(String idOrder) throws Exception 
	   {
		    Order ord = new Order();
		    DBOrder dbOrd = new DBOrder();
		    ord = dbOrd.findOrderId(idOrder, false);
		    int i = 0;
		
		    ord.setPaymentDeadline("14-11-2010");
		    if( ord != null)
		    	i = dbOrd.updateOrder(ord);
		    
		    return i;
	   }
	   
	   /**
	    * @param idOrder
	    * @return i deletes an object Order for a given idOrder
	    * @throws Exception
	    */
	   public int deleteOrder(String idOrder) throws Exception 
	   {
	    Order ord = new Order();
	    DBOrder dbOrd = new DBOrder();
	    int i = 0;
	    ord = dbOrd.findOrderId(idOrder, false);
	    
	    if(ord != null)
	    	i = dbOrd.deleteOrder(idOrder);
	    
	    return i;
	}
